package top.lingchen.blogapi.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.lingchen.blogapi.service.LoginService;
import top.lingchen.blogapi.vo.Result;

/**
 * @Author 凌宸
 * @create 2021-12-16 下午 6:53
 * @Description
 * @Version 1.0
 */
@RestController
@RequestMapping("/logout")
public class LogoutController {
    @Autowired
    private LoginService loginService;

    @GetMapping
    public Result logout(@RequestHeader("Authorization") String token){
        return loginService.logout(token);
    }

}
